//假设int型变量value已经被初始化为一个正整数。编写一个while循环，输出从1到value之间每个数的所有正因子的值。
public class SR5_23
{
  public static void main(String []args)
  {
  int value = 4;
  int factor1 =1,factor2;

  while(factor1 <= value)
  {
     System.out.println("factors of " +factor1+ ":");
     factor2 = 1;
     while(factor1 <= factor2)
     {
       if((factor1%factor2) == 0)
          System.out.println(" "+factor2);
       factor2++;
      }
      System.out.println();
      factor1++;
   }
   }
}

